package cn.wolfcode.blog.service.impl;

import cn.wolfcode.blog.domain.User;
import cn.wolfcode.blog.mapper.UserMapper;
import cn.wolfcode.blog.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements IUserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public void create(User user) {
        userMapper.insert(user);
    }

    @Override
    public User getById(String id) {
        return userMapper.selectByPrimaryKey(id);
    }
}
